<!DOCTYPE html>
<html lang="zh_CN">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>W3c导航条</title>
    <link rel="stylesheet" href="../css/reset.css">
    <style>
        /* 设置nav大小 */
        .nav {
            width: 1210px;
            height: 48px;
            background-color: #e8e7e3;
            margin: 100px auto;
        }
        .nav li {
            /* 设置li向左浮动,已使菜单横向排列 */
            float: left;
            /* 设置li高度 */
            /* height: 48px; */
            line-height: 48px;
            /* background-color: red; */
        }
        .nav a {
            /* 把a从行内元素转换成块元素 */
            display: block;
            text-decoration: none;
            color: #777;
            font-size: 18px;
            padding: 0 39px;
        }
        .nav li:last-child a {
            padding: 0 42px 0 41px;
        }
        /* 设置鼠标移入的效果 */ 
        .nav a:hover {
            background-color: #3f3f3f;
            color: #e7e8e3;
        }
    </style>
</head>
<body>
    <!-- 创建导航条的结构 -->
    <ul class="nav">
        <li>
            <a href="#">HTML/CSS</a>
        </li>
        <li>
            <a href="#">Browser Side</a>
        </li>
        <li>
            <a href="#">Server Side</a>
        </li>
        <li>
            <a href="#">Programming</a>
        </li>
        <li>
            <a href="#">XML</a>
        </li>
        <li>
            <a href="#">Web Building</a>
        </li>
        <li>
            <a href="#">Reference</a>
        </li>
    </ul>
</body>
</html>